<extend name="Public/base" />

<block name="header">
<include file="Public/header" />
<link href="__PUBLIC__/Admin/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="__PUBLIC__/Admin/js/html5shiv.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/Admin/date/daterangepicker-bs3.css"/>
</block>

<block name="footer">
	<include file="Public/footer" />
	<script type="text/javascript" src="__PUBLIC__/Admin/date/moment.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/date/daterangepicker.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#ctime').daterangepicker({ singleDatePicker: true }, function(start, end, label) {
			console.log(start.toISOString(), end.toISOString(), label);
		});
		$('#cotime').daterangepicker({ singleDatePicker: true }, function(start, end, label) {
			console.log(start.toISOString(), end.toISOString(), label);
		});
	});
	</script>
</block>

<block name="main">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">班级信息</h1>
			</div>
			<!-- /.col-lg-12 -->
		</div>

		<div class="row">
			<div class="col-lg-12">
				<!--
				<div class="panel panel-default">
					<div class="panel-heading"> Basic Form Elements </div>
				</div>
				-->
				<div class="panel-body">
					<div class="row">
						<div class="col-lg-6">
							<form action="" method="post">
								<div class="form-group">
									<label>学科</label>
									<select name="ctype" class="form-control">
										<volist name="subject" id="subject">
										<option value="{$subject['id']}" <if condition="$subject['id'] eq $info['ctype']">selected="selected"</if> >{$subject['name']}</option>
										</volist>
									</select>
								</div>
								<volist name="input" id="input">
								<if condition="$input['key'] eq 'PRI'">
								<input name="{$input['field']}" value="{$info[$input['field']]}" type="hidden">
								<else/>
								<if condition="in_array($input['field'],$showcol)">
								<div class="form-group">
									<label>{$input['comment']|comment=###,'name'}</label>
									<input class="form-control" name="{$input['field']}" value="{$info[$input['field']]}">
									<!--<p class="help-block">描述</p>-->
								</div>
								</if>
								</if>
								</volist>
								<div class="form-group">
									<label>开始时间</label>
									<input class="form-control" id="ctime" name="ctime" value="<if condition="$info['ctime']">{$info['ctime']|date="Y-m-d",###}</if>">
								</div>
								<if condition="$info">
								<div class="form-group">
									<label>状态</label>
									<input type="radio" name="cstatus" value="1" <if condition="$info['cstatus'] eq 1">checked="checked"</if> /> 停课
									<input type="radio" name="cstatus" value="0" <if condition="$info['cstatus'] eq 0">checked="checked"</if> /> 正常
								</div>
								</if>
								<if condition="$info['cstatus'] eq 1">
								<div class="form-group">
									<label>开课时间</label>
									<input class="form-control" id="cotime" name="cotime" value="<if condition="$info['cotime']">{$info['cotime']|date="Y-m-d",###}</if>">
								</div>
								</if>
								<button type="submit" class="btn btn-default">提交</button>
							</form>
						</div>
					</div>
				</div>
			</div>
			<!-- /.col-lg-12 -->
		</div>
		<!-- /.row -->
	</div>
</block>
